<template>
  <div class="app-container clearfix">  
    
  </div>
</template>

<script>
import waves from '@/directive/waves' // waves directive
import {getGradeList,refreshCustomerTotal} from '@/api/customer/grade'



export default {
  name: 'gradeAdmin',
  components: {  },
  directives: {  },
  filters: {
  },
  data() {
    return {
      filterForm: {
        page: 1,
        size: 10,
        localSymbol:"",
        status:5,
        style:"0",
        keyword: undefined
      }
    }
  },
  created() {
  },
  destroyed () {
  },
  methods: {
    getList:function(){
      let _this = this;
      console.log("期权",_this.filterForm)
      getGradeList(_this.filterForm).then((response) => {
        console.log("getList",response)
          if (response.code === 200) {
            this.list = response.data.list
            this.total = response.data.total
          } else {
            _this.$message({
              message: response.msg,
              type: 'error'
            })
          }
      })
    },
    refreshCustometTotal:function(grade){
      let _this = this;
      if(grade == undefined){
        return false;
      }
      let formdata = {
        "gradeID":grade.ID
      }
      refreshCustomerTotal(formdata).then((response) => {
          if (response.code === 200) {
            _this.getList()
          } else {
            _this.$message({
              message: response.msg,
              type: 'error'
            })
          }
      })
    },
    handleFilter() {
      this.filterForm.page = 1
      this.getList()
    },
    sortChange:function(){

    }
  }
}
</script>
<style>
.filter { float: left; width: 160px; padding: 20px; min-height: 600px; }
.article { float: left; width: 800px; }
.article-item { width: 800px; height: 200px; margin-right: 25px; }
.article-item-text { float: left; width:600px; }
.article-item-icon { float: right; width:200px; height:150px; padding-left: 50px; }
.article-item-icon img { width:100%; height:100%; border-radius: 10px; }
</style>